package o;

import android.util.Pair;
import com.google.android.exoplayer2.drm.DrmSession;
import java.util.Map;

public final class ads {
    public static Pair<Long, Long> ˊ(DrmSession<?> drmSession) {
        Map ʻ = drmSession.ʻ();
        if (ʻ == null) {
            return null;
        }
        return new Pair(Long.valueOf(ˏ(ʻ, "LicenseDurationRemaining")), Long.valueOf(ˏ(ʻ, "PlaybackDurationRemaining")));
    }

    private static long ˏ(Map<String, String> map, String str) {
        if (map != null) {
            try {
                String str2 = (String) map.get(str);
                if (str2 != null) {
                    return Long.parseLong(str2);
                }
            } catch (NumberFormatException e) {
            }
        }
        return -9223372036854775807L;
    }
}
